package userCollenter.Controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/*import userCollenter.dao.UserDao;*/
import userCollenter.dao1.UserFeignClient;
import userCollenter.pojo.User;


@RestController
@RequestMapping("consume")
public class UserController {

   /* @Autowired
    private UserDao userDao;*/

    @Autowired
    private UserFeignClient userFeignClient;

  /*  @GetMapping
    public String consume(@RequestParam("ids") String ids) {
        return userDao.queryUserById(ids);
    }*/

    @GetMapping
    public User consume(@RequestParam("ids") String ids) {
        return userFeignClient.queryUserById(ids);
    }
}
